﻿using System;
using System.Collections;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Hashtable hashtable = new Hashtable();

            hashtable.Add(1,"南极");

            hashtable.Add(2,"非洲");

            hashtable.Add(3,"广州");

            var table = hashtable.GetEnumerator();

            while (table.MoveNext())
            {
                var item = table.Current;
            }

            foreach (DictionaryEntry item in hashtable)
            {
                var a = item.Key;
                var b = item.Value;
                Console.WriteLine("{0} {1}",a,b);
            }

        }
    }
}
